<!DOCTYPE html>
            
<HTML>
<HEAD>
<meta name="booktitle" content="Developing Applications With Objective Caml" >
 <meta charset="ISO-8859-1"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<META name="GENERATOR" content="hevea 1.05-7 of 2000-02-24">
<META NAME="Author" CONTENT="Christian.Queinnec@lip6.fr">
<LINK rel=stylesheet type="text/css" href="videoc-ocda.css">
<script language="JavaScript" src="videoc.js"><!--
//--></script>
<TITLE>
 Introduction
</TITLE>
</HEAD>
<BODY class="regularBody">
<A HREF="book-ora043.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora045.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2> Introduction</H2>This chapter presents the <TT>Graphics</TT> library, which is included
in the distribution of the Objective CAML-language. This library is designed in
such a way that it works identically under the main graphical interfaces
of the most commonly used operating systems: Windows, MacOS,
Unix with X-Windows. <TT>Graphics</TT> permits the realization of
drawings which may contain text and images, and it handles basic events
like mouse clicks or pressed keys.<BR>
<BR>
The model of programming graphics applied is the ``painter's model:''
the last touch of color erases the preceding one. This is an imperative
model where the graphics window is a table of points which is physically
modified by each graphics primitive. The interactions with the mouse and
the keyboard are a model of event-driven programming: the primary function
of the program is an infinite loop waiting for user interaction. An
event starts execution of a special handler, which then returns to the
main loop to wait for the next event.<BR>
<BR>
Although the <TT>Graphics</TT> library is very simple, it is sufficient
for introducing basic concepts of graphical interfaces, and it also
contains basic elements for developing graphical interfaces that are
rich and easy to use by the programmer.<BR>
<BR>
<HR>
<A HREF="book-ora043.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora045.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
